<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

// 无需登录
Route::group(function () {

    //获取首页信息
    Route::get('/website', 'index/website');

    //用户下线
    Route::post("user/offline", "User/userOffline");

    //腾讯云 视频回调 
    Route::get("callback/tencent", "Index/TencentVideoCallback");

    //测试接口
    Route::get("test", "Index/test");

    //提交图片
    Route::post("uploadfile","index/uploadfile");
    Route::get("wechat/login/:ident/:roomid/:type","WechatController/login");

})->middleware(\broadcast\middleware\AllowOriginMiddleware::class);


//需要网站配置
Route::group(function () {

    // 微信
    Route::post("wechat/wap","WechatController/authorization");
    Route::post("wechat/moblie","WechatController/moblieAuth");
    Route::post("wechat/signlogin","WechatController/signs");


    //获取行业动态
    Route::get("/industry", 'index/industry');
    //网站配置
    Route::post("index", 'Index/index');
    //用户登录
    Route::post("login", 'User/login');
    //游客登录
    Route::post("tourist/login", 'User/tourist_login');
    //获取基本功能
    Route::post("finance", 'Index/finance');
    //讲师列表
    Route::post("lecturer/list", 'Lecturer/lst');
    //定时任务
    Route::post("timing/one", 'Index/timingOneMinute');

    Route::post("timing/five","Index/timingFiveMinute");
    //注册
    Route::post("register", "AuthController/register");
    //手机号验证码  -- 判断ip 被禁
    Route::post("verify", "AuthController/verify");

    //验证码    ---   判断手机号属于直播间用户
    Route::post("forget/verify", 'AuthController/phoneVerify');

    //验证手机号
    Route::post("forget/verification", 'AuthController/verification');

    //重新设置密码
    Route::post("forget/set", "AuthController/userForget");

    //仓库管理
    Route::post("warehouse", "Index/warehouse");

    //获取当前讲师
    Route::post('lecture/current', 'Lecturer/currentLecture');

    //礼物列表  --  送礼
    Route::post("gift/list","Additional/givingLst");

})->middleware(\broadcast\middleware\AllowOriginMiddleware::class)->middleware(\broadcast\middleware\AuthWebMiddleware::class, true);

//需要登录  
Route::group(function () {

    //用户机器人
    Route::post("robots", 'User/robots');
    //用户给讲师点赞
    Route::post("lecturer/give", 'Lecturer/give');
    //用户给讲师投票
    Route::post("lecturer/vote", 'Lecturer/getVote');
    //用户签到
    Route::post("user/sign", 'User/sign');
    //个股诊断
    Route::post("user/diagnosis", 'User/diagnosis');

    //用户修改
    Route::post("user/edit", "User/userEdit");

    //用户密码修改
    Route::post("user/editpass", "User/userEditPass");

    //发送红包
    Route::post("user/envelopes/send", "User/sendEnvelopes");

    //领取红包
    Route::post("user/envelopes/get", "User/getEnvelopes");

    //IM 获取用户列表
    Route::get("im/users", "Im/getUsers");
    //IM 禁言用户
    Route::post("im/forbid", "Im/forbidSendMsg");
    //IM 禁言用户列表
    Route::post("im/forbidlist", "Im/getGroupShuttedUin");
    //IM 禁言用户 根据ip
    Route::post("im/forbidip", "Im/forbidIp");
    //IM 群成员列表
    Route::get("im/GroupMemberList", "Im/getGroupMemberInfo");

    //房间修改
    Route::post("room/edit",'Index/editRooms');

    //提交申诉
    Route::post("appeal",'AuthController/addAppeal');

    //获取用户信息
    Route::post("user/info","User/useinfo");

    //获取UserSig
    Route::get('user_sig',"User/getUserSig");

    
    //礼物列表  --  抽奖
    Route::post("luck/list","Additional/giftList");

    //抽奖  -- 进行
    Route::post("luck/conduct","Additional/giftLuckDraw");

    //获取当前用户的奖励列表  -- 抽奖
    Route::post("luck/record","Additional/LuckDrawRecord");

    //送礼  
    Route::post("gift/send","Additional/sendGiving");

    //获取送礼记录 -- 用户  
    Route::post("gift/record","Additional/givingRecord");

    //获取送礼记录 -- 讲师  
    Route::post("gift/records","Additional/givingRecords");

})->middleware(\broadcast\middleware\AllowOriginMiddleware::class)->middleware(\broadcast\middleware\AuthWebMiddleware::class, true)->middleware(\broadcast\middleware\AuthTokenMiddleware::class, true);





